<template>
  <div>
    <el-card style="height: 400px">
      <template #header>华中置业公司经营日报表（公司）</template>
      <div>
        <el-descriptions :column="2" border>
          <el-descriptions-item label="本日收款总额">{{
            companyList.sumReceivePaymentPrice
          }}</el-descriptions-item>
          <el-descriptions-item label="本日付款总额（-）">{{
            companyList.sumPaymentPrice
          }}</el-descriptions-item>
          <el-descriptions-item label="本日现金余额">{{
            companyList.sumDayBalance
          }}</el-descriptions-item>
          <el-descriptions-item label="现金累计总额">{{
            companyList.sumTotal
          }}</el-descriptions-item>
          <el-descriptions-item
            v-for="item in companyList.paymentList"
            :key="item.id"
            :label="item.typeName"
            >{{ item.sumPaymentPrice }}</el-descriptions-item
          >
        </el-descriptions>
      </div>
    </el-card>
  </div>
</template>
<script setup name="Cpdaily">
import { getCompanyDaily } from "@/api/dailyNewspaper/operateReport";
import { ref } from "vue";
const companyList = ref({});
const queryParams = ref({
  date: new Date().toISOString().split("T")[0],
});
function getList() {
  getCompanyDaily(queryParams.value).then((response) => {
    companyList.value = response.data;
  });
}
getList();
</script>
